#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2024/3/14 10:25
# @Author : 闫峰
# @File    : mysqlSql.py
sql1= """DELETE FROM test_zhcxkj_center_listing_comprehensive.t_walmart_wfs_listing WHERE source_id=21304 AND item_id=5398718802 and sku='17464662';"""
sql2 = """DELETE FROM test_zhcxkj_center_listing_comprehensive.t_walmart_wfs_listing_properties WHERE wfs_listing_id=1806159;"""
sql3 = """DELETE FROM test_zhcxkj_center_listing_comprehensive.t_walmart_listing WHERE source_id=11623 AND item_id=1193659297 and sku='9420293';"""
sql4 = """DELETE FROM test_zhcxkj_center_listing_comprehensive.t_walmart_listing_properties WHERE listing_id=2557005;"""
mysql_setup_delete_sql_list = [sql1, sql2, sql3, sql4]

sql5 = """INSERT INTO `test_zhcxkj_center_listing_comprehensive`.`t_walmart_wfs_listing`(`id`, `customer_id`, `source_id`, `source_name`, `name`, `name_cn`, `spu`, `sku`, `item_id`, `source_sku`, `main_image`, `platform_category_id`, `platform_category_name`, `brand_id`, `brand`, `publish_status`, `status`, `product_state`, `tort`, `gtin`, `upc`, `sale_price`, `purchase_price`, `original_price`, `days_to_ship`, `first_publish_time`, `primary_variant`, `has_variant`, `has_new`, `description_type`, `default_local_warehouse`, `currency`, `country_code`, `remark`, `salesman_id`, `salesman`, `listing_person`, `fulfillment_type`, `ship_methods`, `average_rating`, `template_id`, `template_name`, `freight_price`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (1806159, 1, 21304, 'Walmart-Z10213-ATri', '6 Pcs Multipurpose Pan Tinfoil Cup Barbecue Aluminum Pot Food Tray Baking Covered Kitchen Supplies Cake Pans for Camping', '锡纸杯烧烤铝锅铝箔锅生蚝杯可加热多用途烧烤加热锡纸锅（8寸带盖铝箔锅2300ml）6PCS', NULL, '17464662', 5398718802, 'KBWZ043519QMC6ISUS', 'https://i5.walmartimages.com/asr/85e66f32-1b56-45e9-a03c-a30147083bb4.034c72bba261dfb2fbad866d6bd3b5bf.jpeg', 202896, 'Home Decor, Kitchen, & Other', NULL, 'ATriss', 1, 1, 0, 1, '07432462737546', NULL, 27.4600, 12.6000, 28.4500, 3, '2024-02-04 04:35:20', 0, 0, 1, NULL, 333, 'USD', 'US', NULL, 9747, '薛奕君', '系统管理员', 'Seller Fulfilled', 5, NULL, 202402999000133389, 'Freight Template 2', 0.9900, 1, '2024-02-04 13:09:13', 1, '2024-03-12 14:29:54', 0);"""
sql6 = """INSERT INTO `test_zhcxkj_center_listing_comprehensive`.`t_walmart_wfs_listing_properties`(`id`, `customer_id`, `wfs_listing_id`, `source_id`, `source_sku`, `images`, `properties`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (1, 1, 1806159, 1, 'KBWZ043519QMC6ISUS', '[{\"desc\": \"主图\", \"type\": 1, \"image\": \"https://picture-cdn.zhcxkj.com/92297/1/ProductImages/17464662/2023/09/19/82af8bb1718342e7a1e4a2c06aa37d8c/5f1a2878-16ea-4b55-8d24-cc958490e9fc.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"https://picture-cdn.zhcxkj.com/85443/1/ProductImages/17464662/2023/09/19/d0b370ce31364289a8105066c29c84bb/28837348-0044-4f02-8ef7-d8efc4877cd1.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"https://picture-cdn.zhcxkj.com/54269/1/ProductImages/17464662/2023/09/19/495f6cb636d74b22a3ecef0d46ab5c3c/8f951f19-eddd-4876-85d3-939713fcc08b.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"https://picture-cdn.zhcxkj.com/96192/1/ProductImages/17464662/2023/09/19/45d54f10f667447d866741bb3e15bed3/c6a92f5f-8f0b-4d7c-b42f-3bdde0f6642b.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"https://picture-cdn.zhcxkj.com/70203/1/ProductImages/17464662/2023/09/19/f9bf6b2909c94f449fb823e42a4efe31/36d03bd7-b0f7-4393-a021-3959066fe26e.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"https://picture-cdn.zhcxkj.com/35646/1/ProductImages/17464662/2023/09/19/f1bffae6236c4489965d1015acec6c3c/e00c81ed-6db7-4970-aef1-8e81e42a1352.jpg\"}]', '{\"msrp\": 34.14, \"size\": \"25.50X22.00X9.50CM\", \"color\": \"Silver\", \"features\": \"Perfect for baking, barbecuing, picnics, parties, food storage, and indoor or outdoor Barbecue activities.|Made of tinfoil, it protects food from moisture, keeps food fresh, is easy to store and transport.|It\'s perfect for dining, entertaining guests, or hosting parties. Simple and practical design, disposable use, cost-effective.|High temperature resistant, this pot is suitable for refrigerator, oven, steaming box, open flame, etc.|Suitable for most occasions, such as supermarkets, shopping malls, homes, food store, etc.\", \"material\": [\"tinfoil\"], \"keyFeatures\": \"cup cake pans for baking, Recyclable Tinfoil Pot, Food Baking Tinfoil Pot, Tinfoil Pot with Lid, Covered Baking Foil Pot, barbecue foil Pot, barbecue food containers, disposable food Pot, food foil Pot, bbq accessory, convenient food containers\", \"productName\": \"6pcs Food Tinfoil Pot Camping Baking Tinfoil Pot Barbecue Recyclable Food Pot\", \"packingListDesc\": \"6 × foil pots\", \"shortDescription\": \"<strong>Description</strong><br />\\n<br />\\n<span class=\\\"keyword\\\">Are you</span><span>&nbsp;looking for a  Barbecue professional, yet affordable&nbsp;<span>tinfoil&nbsp;</span><span>pot</span>?&nbsp;</span><span class=\\\"keyword\\\">Are you</span><span>&nbsp;in search of a sturdy, trustworthy&nbsp;pot&nbsp;that can help you cooking? If yes, look no further! Our professional&nbsp;<span>tinfoil&nbsp;</span><span>pot</span>&nbsp;must meet your needs.&nbsp;</span><span>It contains sufficient quantities to be useful and practical for s, wedding parties, picnics, which is one of the best choice for you.</span><br />\\n<br />\\n<strong>Features</strong><br />\\n<br />\\n-Color:Silver<br />\\n-Material:Tinfoil<br />\\n-Size:25.50X22.00X9.50cm/10.02X8.65X3.73in<br />\\n<span>-Capacity: 2300ml</span><br />\\n<span>- Perfect for baking, barbecuing, picnics, parties, food storage, and indoor or outdoor activities.</span><br />\\n<span>- Made of&nbsp;</span><span>tinfoil</span><span>, it protects food from moisture, keeps food fresh, is easy to store and transport.</span><br />\\n<span>- It\'s perfect for dining, entertaining guests, or hosting parties. Simple and practical design, disposable use, cost-effective.</span><br />\\n<span>- High temperature resistant, this pot is suitable for refrigerator, oven,  steaming box, open flame, etc.</span><br />\\n<span>-Suitable for most occasions, such as supermarkets, shopping malls, homes, food store, etc.</span><br />\", \"fulfillmentLagTime\": 1, \"smallPartsWarnings\": [\"0 - No warning applicable\"], \"assembledProductWidth\": {\"unit\": \"in\", \"measure\": 8.66}, \"assembledProductHeight\": {\"unit\": \"in\", \"measure\": 3.74}, \"assembledProductLength\": {\"unit\": \"in\", \"measure\": 10.03}, \"assembledProductWeight\": {\"unit\": \"lb\", \"measure\": 0.61}, \"countryOfOriginTextiles\": \"USA and Imported\", \"compositeWoodCertificationCode\": \"1 - Does not contain composite wood\"}', NULL, 1, '2024-02-05 21:10:28', 1, '2024-03-14 09:54:58', 0);"""
sql7 = """INSERT INTO `test_zhcxkj_center_listing_comprehensive`.`t_walmart_listing`(`id`, `customer_id`, `source_id`, `source_name`, `name`, `name_cn`, `gtin`, `spu`, `sku`, `item_id`, `source_sku`, `main_image`, `platform_category_id`, `platform_category_name`, `brand_id`, `brand`, `publish_status`, `status`, `product_state`, `tort`, `upc`, `sale_price`, `purchase_price`, `original_price`, `days_to_ship`, `first_publish_time`, `primary_variant`, `has_variant`, `has_new`, `description_type`, `default_local_warehouse`, `currency`, `country_code`, `remark`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`, `salesman_id`, `salesman`, `listing_person`, `fulfillment_type`, `template_id`, `template_name`, `freight_price`, `average_rating`) VALUES (2557005, 1, 11623, '直发-Walmart-Z10139-OXM', '40pcs Exquisite Christmas Elements Cupcake Toppers Cake Insert Cards Decor', '圣诞鹿角插牌 闪粉金色 红色 圣诞节快乐蛋糕插牌（鹿角金色，鹿角红色各20个）40pcs', '06483688688083', NULL, '9420293', 1193659297, 'C4A000141G0G3OOLC', 'https://i5.walmartimages.com/asr/14862742-54a6-43d1-b7ee-87bf420c9f9e.e821ebec71eec9f3247ed18877d610bb.jpeg', 202896, 'Home Decor, Kitchen, & Other', NULL, 'OXM', 1, 1, 0, 1, NULL, 12.4900, 15.2000, NULL, 3, '2023-08-10 00:01:41', 0, 0, NULL, NULL, 333, 'USD', 'US', NULL, 1, '2023-08-10 02:30:18', 1, '2024-03-14 09:55:06', 0, 5343, '郑若茵', '系统管理员', 'Seller Fulfilled', 463986567495933953, '2', 2.0000, NULL);"""
sql8 = """INSERT INTO `test_zhcxkj_center_listing_comprehensive`.`t_walmart_listing_properties`(`id`, `customer_id`, `listing_id`, `source_id`, `source_sku`, `images`, `properties`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `is_deleted`) VALUES (500, 1, 2557005, 1, 'C4A000141G0G3OOLC', '[{\"desc\": \"主图\", \"type\": 1, \"image\": \"http://picture-cdn02.zhcxkj.com/89435/1/ProductImages/9420293/2020-11-07/7c4c01b08192450684285487ba25ac0a/30a68f65-19c8-49f9-9ffa-437518bca9d3.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"http://picture-cdn02.zhcxkj.com/24270/1/ProductImages/9420293/2020-11-07/94bea3a3de7d4087b79e45ff339518cb/ac03bb33-b420-4f83-bfbe-b9733b5ea515.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"http://picture-cdn02.zhcxkj.com/21457/1/ProductImages/9420293/2020-11-07/5405053f26cb4afa881c68b7f94c8ecc/dbec22d5-103c-4cc4-8cb4-fcf864fd014a.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"http://picture-cdn02.zhcxkj.com/50606/1/ProductImages/9420293/2020-11-07/a9cc4039b18b430eac2accd51947ef29/11f2e072-752f-40a6-8fd2-0a0972d487bf.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"http://picture-cdn02.zhcxkj.com/59773/1/ProductImages/9420293/2020-11-07/d989e147e74944e88031f5f23f9c2d6e/bec6763e-f17a-4337-96fa-6a541a4996b6.jpg\"}, {\"desc\": \"普图\", \"type\": 2, \"image\": \"http://picture-cdn02.zhcxkj.com/50605/1/ProductImages/9420293/2020-11-07/26663c92a6d44371b1c7cc08e5d7457a/bdb87079-c071-4d27-9bd4-5366e0cf7426.jpg\"}]', '{\"msrp\": 14.988, \"size\": \"13x8.5 cm\", \"color\": \"Assorted Color\", \"features\": \"Designed with Christmas Toppers theme patterns. It is very lovely and Toppers attractive.|Perfect for Christmas holiday party decorations, Christmas cake decor, etc.|Christmas elements design makes your Christmas party full of festive atmosphere.| and durable material. Food grade material, safe for cake decorating use.|Suitable for decorating cake desserts or other pastries, adding more joy to your Christmas party.\", \"material\": [\"纸\"], \"keyFeatures\": \"Cupcake Insert Topper, Cake Inserts Cards, Dessert Decoration, Cake Ornament, Christmas Party Decor\", \"productName\": \"40pcs Merry Christmas Cake Toppers Christmas Cake Decoration Party Favors\", \"packingListDesc\": \"40 x cake toppers\", \"shortDescription\": \"<strong>Description</strong><br />\\n<br />\\nWant to find a fashion beautiful Toppers cake decoration topper? This set will be your good choice Toppers. The delicate cake topper will give your cake a beautiful appearance. It can be used in various party, theme party, Christmas party, holiday celebrating and so on. It will give you a good mood when you put it on the cake or other decoration places.<br />\\n<br />\\n<strong>Features</strong><br />\\n<br />\\n<span>- Color: Golden, Red.</span><br />\\n<span>- Material:&nbsp;</span><span>Paper.</span><span></span><br />\\n<span>- Size: About&nbsp;</span><span>13.00X8.50X0.10cm/5.11X3.34X0.04inch.</span><br />\\n- Designed with Christmas theme patterns. It is very lovely and attractive.<br />\\n- Perfect for Christmas holiday party decorations, Christmas cake decor, etc.<br />\\n- Christmas elements design makes your Christmas party full of festive atmosphere.<br />\\n- and durable material. Food grade material, safe for cake decorating use.<br />\\n- Suitable for decorating cake desserts or other pastries, adding more joy to your Christmas party.<br />\", \"smallPartsWarnings\": [\"0 - No warning applicable\"], \"assembledProductWidth\": {\"unit\": \"ft\", \"measure\": 3.34}, \"assembledProductHeight\": {\"unit\": \"ft\", \"measure\": 0.03}, \"assembledProductLength\": {\"unit\": \"ft\", \"measure\": 5.11}, \"assembledProductWeight\": {\"unit\": \"lb\", \"measure\": 0.3}, \"countryOfOriginTextiles\": \"USA and Imported\", \"compositeWoodCertificationCode\": \"1 - Does not contain composite wood\"}', '<strong>Description</strong><br />\n<br />\nWant to find a fashion beautiful cake decoration topper? This set will be your good choice. The delicate cake topper will give your cake a beautiful appearance. It can be used in various party, theme party, Christmas party, holiday celebrating and so on. It will give you a good mood when you put it on the cake or other decoration places.<br />\n<br />\n<strong>Features</strong><br />\n<br />\n<span>- Color: Golden, Red.</span><br />\n<span>- Material:&nbsp;</span><span>Paper.</span><span></span><br />\n<span>- Size: About&nbsp;</span><span>13.00X8.50X0.10cm/5.11X3.34X0.04inch.</span><br />\n- Designed with Christmas theme patterns. It is very lovely and attractive.<br />\n- Perfect for Christmas holiday party decorations, Christmas cake decor, etc.<br />\n- Christmas elements design makes your Christmas party full of festive atmosphere.<br />\n- and durable material. Food grade material, safe for cake decorating use.<br />\n- Suitable for decorating cake desserts or other pastries, adding more joy to your Christmas party.<br />', 1, '2023-08-10 02:30:18', 1, '2024-03-12 10:42:39', 0);"""
